clc;clear;close all;

% g = [0 0 -9.81]
d = [0.1096, 0, 0.2765, 0, 0.1265];
a = [0, 0, -0.01, 0, 0];

alpha = [pi/2, pi/2, pi/2, pi/2, pi/2];

L(1)=Link([pi/2 d(1) a(1) alpha(1)], 'modified'); L(1).qlim=[-pi,pi];
L(2)=Link([-pi/2 d(2) a(2) alpha(2)], 'modified'); L(2).qlim=[-pi,pi];
L(3)=Link([pi d(3) a(3) alpha(3)], 'modified'); L(3).qlim=[-pi,pi];
L(4)=Link([pi d(4) a(4) alpha(4)], 'modified'); L(4).qlim=[-pi,pi];
L(5)=Link([pi/2 d(5) a(5) alpha(5)], 'modified'); L(5).qlim=[-pi,pi];

robot6=SerialLink(L,'name','r-hand');
robot6.teach();
